<template>
    <div class="governmentDetails-wrap">
        <div class="details-wrap">
            <image
                class="img"
                src="https://img2.baidu.com/it/u=3814762419,638738365&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500"
                mode="scaleToFill"
            />
        </div>
        <div class="main-header">
            <div class="header-top">
                <div class="label-wrap">
                    <div class="label-content">
                        <div class="label">
                            <div class="reduction">200减20券</div>
                            <span>领</span>
                        </div>
                    </div>
                    <div class="preferential-box">
                        10个优惠<image class="icon" :src="CouponIcon" mode="scaleToFill" />
                    </div>
                </div>
                <span class="title-name">政务单位名称</span>
                <div class="address-wrap">
                    <div class="unit-box">
                        <image class="icon" :src="AddressIcon" mode="scaleToFill" />
                        <div>门店地址: 府城大道505号仁和新城负一楼</div>
                    </div>
                    <div class="iconCall">
                        <image class="icon" :src="CallIcon" mode="scaleToFill" />
                    </div>
                </div>
            </div>
            <div class="date-wrap">
                <image class="icon" :src="DateIcon" mode="scaleToFill" />
                <span>周一至周日:20-80</span>
            </div>
            <div class="line"></div>
            <div class="details-wrap">店铺详情</div>
            <div @click="handlePay">支付</div>
        </div>
    </div>
</template>
<script setup lang="ts">
import AddressIcon from '@/assets/address.png'
import CouponIcon from '@/assets/ic-coupons-count.png'
import CallIcon from '@/assets/call.png'
import DateIcon from '@/assets/date.png'

const handlePay = () => {
    uni.navigateTo({
        url: '/mainPages/payment/index'
    })
}
</script>
<style scoped lang="scss">
.governmentDetails-wrap {
    min-height: 100vh;
    width: 100%;
    background: #fff;
    position: relative;
    .details-wrap {
        height: 180px;
        // background: red;
        .img {
            width: 100%;
            height: 100%;
        }
    }
    .main-header {
        position: absolute;
        top: 160px;
        min-height: 100px;
        width: 100%;
        background: #fff;
        z-index: 10;
        // background: #eee;
        border-top-right-radius: 18px;
        border-top-left-radius: 18px;
        .header-top {
            padding: 10px;
            box-sizing: border-box;
        }
        .label-wrap {
            display: flex;
            justify-content: space-between;
            .label-content {
                display: flex;

                .label {
                    // width: 120px;
                    height: 20px;
                    border: 1px solid rgb(243, 162, 127);
                    font-size: 12px;
                    padding-left: 10px;
                    padding-right: 10px;
                    box-sizing: border-box;
                    border-radius: 15px;
                    display: flex;
                    background: rgb(253, 237, 245);
                    color: rgb(243, 162, 127);
                    .reduction {
                        padding-right: 3px;
                        box-sizing: border-box;
                        border-right: 1px dotted rgb(243, 162, 127);
                        margin-right: 3px;
                    }
                }
            }
        }
        .preferential-box {
            display: flex;
            align-items: center;
            color: #ccc;
            .icon {
                width: 18px;
                height: 18px;
            }
        }
        .line {
            width: 100%;
            height: 1px;
            background: #eee;
        }
        .title-name {
            margin-top: 5px;
            display: inline-block;
        }
        .details-wrap {
            padding: 10px;
            box-sizing: border-box;
        }
        // background: rebeccapurple;
    }
    .address-wrap {
        display: flex;
        justify-content: space-between;
        .unit-box {
            margin-top: 5px;
            display: flex;
            align-items: center;
            font-size: 12px;
            .icon {
                width: 18px;
                height: 18px;
            }
        }
        .iconCall {
            width: 28px;
            height: 28px;
            .icon {
                width: 100%;
                height: 100%;
            }
        }
    }
    .date-wrap {
        // margin-top: 10px;
        padding: 10px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        font-size: 12px;
        .icon {
            width: 18px;
            height: 18px;
        }
    }
}
</style>
